//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_player_stuff.sqf"
#include "x_setup.sqf"

__TRACE_1("player_stuff","_this");
_this = _this select 1;
__TRACE_1("player_stuff new _this","_this");
GVAR(player_autokick_time) = _this select 0;
#ifdef __TT__
private ["_prev_side"];
_prev_side = _this select 5;
if (_prev_side != sideUnknown && {GVAR(player_side) != _prev_side}) then {
	[QGVAR(attention), [GVAR(name_pl), _prev_side, GVAR(player_side)]] call FUNC(NetCallEventToClients);
};
#endif

if (GVAR(WithRevive) == 0 && {(_this select 8) == -1} && {xr_max_lives != -1}) then {
	0 spawn {
		scriptName "spawn_playerstuffparking";
		waitUntil {!GVAR(still_in_intro)};
		__TRACE("player_stuff, calling park_player");
		[false] spawn xr_fnc_park_player;
	};
};
if (GVAR(domdatabase)) then {
	GVAR(player_stats) = [
		_this select 14, // total score
		_this select 15, // total time played on this server
		_this select 17 // number played on this server
	];
};